// pages/house_property/houseDetails/houseDetails.js
var WxParse = require('../../../wxParse/wxParse.js');
var utils = require('../../../utils/util.js');
var httpUrl = getApp().globalData.httpUrl;
var codeName = getApp().globalData.codeName;
Page({

  /**
   * 页面的初始数据
   */
  data: {
  
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that=this;
    var id=options.id;
    utils.http(httpUrl +"houserentdetail",{id:id,code:codeName},function(res){
      console.log(res);
      WxParse.wxParse('article_content', 'html', res.houserentdetail.description, that, 5)
      that.setData({
        houserentdetail:res.houserentdetail,
        bannerList: res.houserentdetail.advlist
      })
      console.log(that.data.bannerList);
    });
  },
  //拨打电话
  oNphoneTap:function(e){
    var phone=e.currentTarget.dataset.phone;
    wx.makePhoneCall({
      phoneNumber: phone //仅为示例，并非真实的电话号码
    })
  }
})